﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using zielonka.co.uk.test.framework.time;

namespace zielonka.co.uk.extensions.system.tests
{
    [TestClass]
    public class AnyOfTests
    {
        enum SomeOptions
        {
            OptionA,
            OptionB,
            OptionC
        }

        [TestMethod]
        public void CorrectlyIdentifyAnyOfOptionEnum()
        {
            SomeOptions expected = SomeOptions.OptionC;

            var actual = SomeOptions.OptionA;
            actual.SetOn(SomeOptions.OptionA);

            if (actual.AnyOf(SomeOptions.OptionA | SomeOptions.OptionB))
            {
                actual = SomeOptions.OptionC;
            }
            Assert.AreEqual(expected,actual);
        }
    }
}
